﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AL100.BankApplication.BLL
{
    public class SimpleAccount : AccountBase
    {
        
        /*********************************************************************************
         * 
         *  Constructors
         * 
         *********************************************************************************/

        /// <summary>
        /// Initializes a new instance of the <see cref="AccountBase"/> class.
        /// </summary>
        /// <param name="holder">The holder.</param>
        /// <param name="initialDeposit">The initial deposit.</param>
        internal SimpleAccount(Customer holder, double initialDeposit) 
            :  base(holder, initialDeposit)
        {}

        /// <summary>
        /// Initializes a new instance of the <see cref="AccountBase"/> class.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="firstName">The first name.</param>
        /// <param name="initialDeposit">The initial deposit.</param>
        internal SimpleAccount(string name, string firstName, double initialDeposit)
            : this(new Customer(name, firstName), initialDeposit)
        { }

        /// <summary>
        /// Gets the max overdrawn amount.
        /// </summary>
        /// <returns>
        /// the max overdrawn amount.
        /// </returns>
        public override double GetMaxOverdrawnAmount()
        {
            return AccountValuesProvider.GetOverdrawnLimit(this);
        }
    }
}
